package behavioral.command;

public class KeyBoard {

    private ICommand m_pPlayCommand;
    private ICommand m_pStopCommand;
    private ICommand m_pResetCommand;

    public void setPlayCommand(ICommand pPlayCommand) {
        this.m_pPlayCommand = pPlayCommand;
    }

    public void setStopCommand(ICommand pStopCommand) {
        this.m_pStopCommand = pStopCommand;
    }

    public void setResetCommand(ICommand pResetCommand) {
        this.m_pResetCommand = pResetCommand;
    }

    public void play() {
        this.m_pPlayCommand.execute();
    }

    public void stop() {
        this.m_pStopCommand.execute();
    }

    public void reset() {
        this.m_pResetCommand.execute();
    }
}
